package com.scm.service.impl;

import com.scm.persist.model.ScmOrderBaobei;
import com.scm.persist.model.ScmOrderBaobeiExample;
import com.scm.persist.model.ScmOrderProduct;
import com.scm.persist.model.ScmOrderProductExample;
import com.scm.persist.mybatis.ScmOrderBaobeiMapper;
import com.scm.persist.mybatis.ScmOrderProductMapper;
import com.scm.service.IScmOrderBaobeiService;
import com.scm.service.IScmOrderProductService;
import lombok.extern.slf4j.Slf4j;
import okhttp3.*;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

/**
 * 订单主Service业务层处理
 * 
 * @author reptilemanager
 * @date 2024-02-08
 */
@Slf4j
@Service
public class ScmOrderBaobeiServiceImpl implements IScmOrderBaobeiService
{

    @Autowired
    ScmOrderBaobeiMapper orderBaobeiMapper;


    @Override
    public int saveBaobei(ScmOrderBaobei record) {

        return orderBaobeiMapper.insertSelective(record);

    }

    @Override
    public List<ScmOrderBaobei> selectOrderBaobei(String omsOrderId) {

        ScmOrderBaobeiExample example = new ScmOrderBaobeiExample();
        example.createCriteria().andOmsOrderIdEqualTo(String.valueOf(omsOrderId));
        List<ScmOrderBaobei> list = orderBaobeiMapper.selectByExample(example);
        return list;
    }

}
